package top.chatgqt.SmartChargeStation.demo.mqtt.PahoMode.service.impl;

import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import top.chatgqt.SmartChargeStation.demo.mqtt.PahoMode.service.ClientService;
import top.chatgqt.SmartChargeStation.demo.mqtt.PahoMode.utils.MqttClientUtils;

@Service
public class ClientServiceImpl implements ClientService {

    @Resource
    private MqttClientUtils mqttClientUtils;

    @Override
    public void publish(String topic, String message) {
        mqttClientUtils.publish(topic, message);
    }

    @Override
    public void subScribe(String topic) {
        mqttClientUtils.subScribe(topic);
    }

    @Override
    public void disconnect() {
        mqttClientUtils.disconnect();
    }
}
